<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page session="false" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Add User</title>

</head>

<body>
<h1>Add User</h1>
<c:url var="viewUsersUrl" value="/users/list.html" />
<a href="${viewUsersUrl}">View Existing Users</a>

<br /><br />

<c:url var="updateUserUrl" value="/users/update/${user.id}.html" />

<form:form modelAttribute="user" method="POST" action="${updateUserUrl}">
    <form:label path="firstname">User Firstname:</form:label>
    <form:input path="firstname"/><br />
    <form:label path="lastname">User Lastname:</form:label>
    <form:input path="lastname"/><br />
    <form:label path="email" >email:</form:label>
    <form:input path="email" /><br />
    <form:label path="password" >password:</form:label>
    <form:input path="password" /><br />
    <form:label path="contact" >contact:</form:label>
    <form:input path="contact" /><br />


    <input type="submit" value="Save User" />
</form:form>

</body>
</html>